//
//  RCBackgroundView.m
//  RemoteSay
//
//  Created by Jan Lehnardt on 29/03/2007.
//  Copyright 2007 Jan Lehnardt. All rights reserved.
//

#import "RCBackgroundView.h"


@implementation RCBackgroundView

- (id)initWithFrame:(NSRect)frame {
	NSLog(@"init custom view");
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code here.
		[self setNeedsDisplay:YES];

    }
    return self;
}

- (void)drawRect:(NSRect)rect {
    // Drawing code here.
	NSLog(@"draw custom view");
	
	NSImage *image = [NSImage imageNamed:@"bg"];
	NSRect imageRect;
	imageRect.origin = NSZeroPoint;
	imageRect.size = [image size];
	[image drawInRect:imageRect fromRect:imageRect operation:NSCompositeSourceOver fraction:1.0];
	[[self window] invalidateShadow];

}

@end
